[App Service] az webapp troubleshoot status: provide latest application startup attempt data#33673
Conversation
|
Validation for Azure CLI Full Test Starting...
Thanks for your contribution! |
|
Hi @aamos-company, |
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Thank you for your contribution @aamos-company! We will review the pull request and get back to you soon. |
az webapp troubleshoot: provide latest application startup attempt data
There was a problem hiding this comment.
Pull request overview
This PR extends the App Service command module with new runtime-status troubleshooting capabilities by introducing a webapp status command (ARM siteStatus) and a preview webapp troubleshoot status command (ARM siteStatus + SCM startup summary), plus associated help, params, and tests.
Changes:
- Add
az webapp statusto fetch per-instance Site Runtime Status (ARMsiteStatus), including--instancefiltering and table formatting. - Add preview
az webapp troubleshoot statusto combine ARM runtime status with SCM startup summary, rendered as a human-readable report for table output. - Add scenario + mocked tests and a new recording; update HISTORY entry.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/azure-cli/HISTORY.rst | Adds history note for the new az webapp status command. |
| src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py | Adds live scenario coverage for az webapp status. |
| src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands_thru_mock.py | Adds mocked unit tests for troubleshoot status, webapp status, and output transform behavior. |
| src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_webapp_status.yaml | Adds VCR recording for the new scenario test. |
| src/azure-cli/azure/cli/command_modules/appservice/custom.py | Implements show_webapp_status, troubleshoot_status, formatting, and status-tip logging. |
| src/azure-cli/azure/cli/command_modules/appservice/commands.py | Registers new commands and table transformers. |
| src/azure-cli/azure/cli/command_modules/appservice/_params.py | Adds --instance parameter wiring for webapp status and webapp troubleshoot status. |
| src/azure-cli/azure/cli/command_modules/appservice/_help.py | Adds help for webapp status and the preview webapp troubleshoot group/command. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| for item in runtime_items: | ||
| _fetch_startup_summary(item) | ||
|
|
||
| # --- 3. Assemble payload --- |
|
App Service |
az webapp troubleshoot: provide latest application startup attempt dataaz webapp troubleshoot status: provide latest application startup attempt data
Related command
Description
Introduces a new command group
az webapp troubleshootand its first command, az webapp troubleshoot status, which surfaces per-instance runtime health plus a 24-hour startup-attempt summary for a Linux web app.What's new
Command: az webapp troubleshoot status -n -g [--slot ] [--instance ] [--report]
• Data sources
• ARM GET /sites/{name}/instances → resolves user-supplied --instance (accepts either the hex ARM instanceId or the friendly machineName ) and pulls properties.machineName
• ARM GET /sites/{name}/siteStatus[/{instance}] → per-instance runtime state , action , details , lastError , lastErrorTimestamp .
• KuduLite GET /api/startuplogs/summary → 24 h startup-attempt counts and most-recent success/failure timestamps per worker, in a single unfiltered call (fanning out per-instance was 4 RTT with ThreadPoolExecutor ; this is 1 RTT regardless of N).
• Linux only — errors early on Windows with a clear message. Site Runtime Status is a Linux-only feature.
• Preview — command group registered as preview per RP guidelines.